package com.itheima;

import com.itheima.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-05 09:22
 * @description 演示factoryBean模式创建!!!!
 */
public class Test01 {


    public static void main(String[] args) {

        //今天学习spring框架 核心就是帮你创建对象的

        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");


        Object factory = context.getBean("sqlSessionFactory");
        System.out.println("获取对象:"+factory);


    }







}
